﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人中心</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0, user-scalable=no" />
<link rel="shortcut icon" href="/Images/ico/favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="/css/swiper.min.css" />
<link rel="stylesheet" type="text/css" href="/css/style.css" />
<link type="text/css" rel="stylesheet" href="/layui/css/layui.css"  media="all">
<script type="text/javascript" src="/layui/layui.js" charset="utf-8"></script>
<script src="/js/jquery.min.js" type="text/javascript"></script>
<script src="/js/swiper.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/custom.js"></script>
<script type="text/javascript" src="/js/bottom-menu.js"></script>
<script type="text/javascript" src="/js/layui-post.js"></script>
</head>
<body>
    <div class="ng-scope">
        <div class="header ng-scope" onclick="window.location.href='/setinfo'">
            <img src="/images/lg.jpg" class="img" style="height: 60px;">
<!--            <p class="mobile ng-binding">15625632565</p>-->
            <p class="nickname ng-binding" style="top:45px;"></p>
        </div>
        <div style="clear:both;background:#E0E0E0;height:5px;" class="ng-scope"></div>
        <ul class="headerlist ng-scope">
            <li class="ng-binding">
                积分余额 <span id="integral">0</span>
            </li>
            <li class="ng-binding">
                累计消费 ￥<span id="paymoney">0.00</span>
            </li>
        </ul>
        <div style="clear:both;background:#E0E0E0;height:5px;" class="ng-scope"></div>
        <ul class="userlist ng-scope">
            <li>
                <a href="#">
                    <p class="ico ico-reward"></p>
                    <p>每日签到</p>
                </a>
            </li>
            <li>
                <a href="/order">
                    <p class="ico ico-order"></p>
                    <p>我的订单</p>
                </a>
            </li>
            <!--<li>
                <a href="#">
                    <p class="ico ico-recommend"></p>
                    <p>推荐有礼</p>
                </a>
            </li>-->
            <li>
                <a href="/coupon">
                    <p class="ico ico-coupon"></p>
                    <p>优惠券</p>
                </a>
            </li>
            <li>
                <a href="/points">
                    <p class="ico ico-integra"></p>
                    <p>积分明细</p>
                </a>
            </li>
            <li>
                <a href="/addresslist">
                    <p class="ico ico-about"></p>
                    <p>我的地址</p>
                </a>
            </li>
            <li>
                <a href="/comments">
                    <p class="ico ico-customer"></p>
                    <p>客服/反馈</p>
                </a>
            </li>
        </ul>
    </div>
</body>
<script>
$.ajaxSetup({contentType: "application/json; charset=utf-8"});
var userInfo = $.parseJSON(sessionStorage.getItem("userInfo"));
layui.use(['layer','form','element','util'], function(){
    $.post("/cateringUser/selectOne",JSON.stringify({opendId:sessionStorage.getItem("opendId")}), function (res) {
        if(res.data != null){
            $("#integral").html(res.data.integral)
            $("#paymoney").html(res.data.payMoney)
            userInfo = res.data;
            if(!isEmpty(res.data.nickName)) $(".nickname").html(res.data.nickName)
            else $(".nickname").html("设置昵称")
            sessionStorage.setItem("userInfo", JSON.stringify(res.data));
        }
    })
})
</script>
</html>
